﻿using System;
using System.Linq;
using System.Linq.Expressions;
using Core.Model;

namespace Core.Service
{
    public interface IService<TObject, TKey> where TObject : EntityBase<TKey>, new()
    {
        TKey Create(TObject o);
        void Save();
        void Delete(TKey id);
        TObject Get(TKey id);
        IQueryable<TObject> GetAll();
        IQueryable<TObject> Where(Expression<Func<TObject, bool>> func);
    }
}
